package com.sg.dto.integration.component;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Objects;

/**
 * @desc DataBigMiniRecordDto
 * @使用场景
 */
@Data
public class DataBigMiniRecordDto extends BaseDto implements Serializable {

    /**
     * 统计内容ID
     */
    @NotNull(message = "统计内容ID不能为空")
    @ApiModelProperty("统计内容ID")
    private String contentID;

    /**
     * 传输数值
     */
    @NotNull(message = "传输数值不能为空")
    @ApiModelProperty("传输数值")
    private Long outputNum;

    /**
     * 计算入参1
     */
    @ApiModelProperty("计算入参1")
    private Double calcPara1;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        DataBigMiniRecordDto that = (DataBigMiniRecordDto) o;
        return (
                contentID == that.contentID &&
                        outputNum == that.outputNum &&
                        calcPara1 == that.calcPara1
        );
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), contentID, outputNum, calcPara1);
    }

}
